# P111
vowels = ["a","e","i","o","u"]
word = input("Provide a word to search for vowels:")
found = {}
found = found.fromkeys(vowels,0)
for letter in word:
    if letter in vowels:
        found[letter] += 1
for k,v in found.items():
    print(k,"was found",v,"time(s)")

# 121
vowels = ["a","e","i","o","u"]
word = input("Provide a word to search for vowels:")
found = {}
for letter in word:
    if letter in vowels:
        found.setdefault(letter,0)
        found[letter] +=1
for k,v in sorted(found.items()):
    print(k,v)

# 138
import pprint
people = {}
people['Ford'] = {"Name":'Ford Prefect',
                  "Gender":'Male',
                  "Occupation":'Researcher',
                  "Home Planet": 'Betelgeuse Seven'}
people['Arthur'] = {"Name":'Arthur Dent',
                  "Gender":'Male',
                  "Occupation":'Sandwich-Maker',
                  "Home Planet":'Earth'}
people['Tricia'] = {"Name":'Tricia McMillan',
                    "Gender":'Female',
                    "Occupation":'Mathematician',
                    "Home Planet":'Earth'}
people['Marvin'] = {"Name":'Marvin',
                    "Gender":'Unknown',
                    "Occupation":'Paranoid Android',
                    "Home Planet":'Unknown'}
pprint.pprint(people)